home *** CD-ROM | disk | FTP | other *** search
- class PlayerShipDestroy extends PlayerShipAction {
- private int fxSpeedX;
- private int fxSpeedY;
- private int fxWeight;
-
- public PlayerShipDestroy(StgFrame var1) {
- super(var1);
- short var2 = (short)('ΘÇÇ' + (Fixed.Random() >> 4));
- int var3 = 655360 + (Fixed.Random() << 1);
- this.fxWeight = 32768;
- this.fxSpeedX = Fixed.Sin(var2);
- this.fxSpeedY = Fixed.Cos(var2);
- this.fxSpeedX = Fixed.Mul(this.fxSpeedX, var3);
- this.fxSpeedY = Fixed.Mul(this.fxSpeedY, var3);
- }
-
- public boolean action(PlayerShipIndex var1) {
- PlayerShip var2 = super.resource.getPlayerShip();
- ((StgObjectIndex)var1).movePosition(this.fxSpeedX, this.fxSpeedY, 0);
- this.fxSpeedY += this.fxWeight;
- if (((StgObjectIndex)var1).cliping()) {
- var1.getNomalShot().deleteAll();
- ((StgObject)var2).delete(var1);
- this.destroy(var1);
- return true;
- } else {
- return true;
- }
- }
-
- boolean destroy(PlayerShipIndex var1) {
- Status var2 = super.resource.getStatus();
- int var3 = var2.getPlayerShipStock();
- int var4 = var2.getContinue();
- JglFrame var5 = super.resource.getResource();
- Sound var6 = var5.getSE();
- Sound var7 = var5.getBGM();
- if (var3 != 0) {
- int var8 = var1.getPower();
- if (var8 != 0) {
- --var8;
- }
-
- super.resource.putPlayerShip(0, var8, 2, 0);
- var2.setPlayerShipStock(var3 - 1);
- } else {
- var7.stop(16);
- if (var4 != 0) {
- super.resource.getGameProcess().setAttr(2);
- var2.setContinue(var4 - 1);
- } else {
- Enemy var9 = super.resource.getEnemy();
- ((StgObject)var9).deleteAll();
- super.resource.getStatus().deleteDisp();
- var6.play(20);
- super.resource.setGameProcess(new RankingProcess(super.resource));
- }
- }
-
- return false;
- }
- }
-